//
//  AXFTestNetWorkViewController.m
//  AIXF
//
//  Created by zhanghui on 2017/7/9.
//  Copyright © 2017年 Macx. All rights reserved.
//

#import "AXFTestNetWorkViewController.h"
#import "AXFHomeSever.h"
#import "AXFSuperMarketSever.h"
#import "AXFMineSever.h"
#import "AXFOrderManager.h"

@interface AXFTestNetWorkViewController ()


@end

@implementation AXFTestNetWorkViewController


IMPLEMENTATION_SINGLETON(AXFTestNetWorkViewController);

//测试首页焦点网络请求
- (void)testHomeFocus{
    
    AXFHomeSever *home = [AXFHomeSever new];
    
    [home requestHomeFocusWith:^(id response) {
        
        NSLog(@"%@",response);
        
    } andFailBlock:^(NSError *error) {
        
        NSLog(@"%@",error);
        
    }];
}

//测试首页新鲜热卖
- (void)testHomeFirstSell{
    
    AXFHomeSever *home = [AXFHomeSever new];
    
    [home requestHomeFirstSellWith:^(id response) {
        
         NSLog(@"%@",response);
    } andFailBlock:^(NSError *error) {
        
        NSLog(@"%@",error);
    }];
    
}

//测试启动广告
- (void)testLaunchAd{
    
    AXFHomeSever *home = [AXFHomeSever new];
    
    [home requestWithLaunchAdWith:^(id response) {
        
         NSLog(@"%@",response);
    } andFailBlock:^(NSError *error) {
        NSLog(@"%@",error);
    }];
    
}

//测试闪电超市
- (void)superMarket{
    
    AXFSuperMarketSever *superMarket = [AXFSuperMarketSever new];
    
    [superMarket requestWithSuperMarketWith:^(id response) {
        
        NSLog(@"%@",response);
        
    } andFailBlock:^(NSError *error) {
        
        NSLog(@"%@",error);
    }];
    
}

//测试搜索
- (void)testSearch{
    
    AXFHomeSever *home = [AXFHomeSever new];
    
    [home requestHomeSearchWith:^(id response) {
        
        NSLog(@"%@",response);
        
    } andFailBlock:^(NSError *error) {
        
        NSLog(@"%@",error);
    }];
    
}

//测试搜索结果
- (void)testSearchResult{
    
    AXFHomeSever *home = [AXFHomeSever new];
    
  
    [home requestHomeSearchReult:^(id response) {
        
          NSLog(@"%@",response);
        
    } andFailBlock:^(NSError *error) {
        
         NSLog(@"%@",error);
    }];
}

//测试我的订单
- (void)testMyOrder{
    
    AXFOrderManager *order = [AXFOrderManager new];
    
    [order requesMyOrderWithSuperMarketWith:^(id response) {
        
        NSLog(@"%@",response);
        
    } andFailBlock:^(NSError *error) {
        
         NSLog(@"%@",error);
    }];
    
}

//测试我的优惠卷
- (void)testMyCoupon{
    
    AXFMineSever *mine = [AXFMineSever new];
    
    [mine requestMineMyCouponWith:^(id response) {
        
        NSLog(@"%@",response);
        
    } andFailBlock:^(NSError *error) {
        
        NSLog(@"%@",error);
        
    }];
}

//测试系统消息
- (void)testSystemMessage{
    
    AXFMineSever *mine = [AXFMineSever new];
    
    [mine requestSystemMessageWith:^(id response) {
        
        NSLog(@"%@",response);
        
    } andFailBlock:^(NSError *error) {
        
        NSLog(@"%@",error);
    }];
}

//测试我的消息
- (void)testUserMessage{
    
    AXFMineSever *mine = [AXFMineSever new];
    
    [mine requestUserMessageWith:^(id response) {
        
         NSLog(@"%@",response);
        
    } andFailBlock:^(NSError *error) {
       
         NSLog(@"%@",error);
        
    }];
    
}

//测试收获地址
- (void)testMyAdress{
    
    AXFOrderManager *order = [AXFOrderManager new];
    
    [order requesMyOrderWithSuperMarketWith:^(id response) {
        
         NSLog(@"%@",response);
        
    } andFailBlock:^(NSError *error) {
        
         NSLog(@"%@",error);
        
    }];
    
}

@end
